package com.CNMedical.system.domain.vo;

import com.diboot.core.binding.annotation.BindEntityList;
import com.diboot.core.binding.annotation.BindField;
import com.CNMedical.system.domain.entity.AppletForum;
import com.CNMedical.system.domain.entity.AppletForumComment;
import com.CNMedical.system.domain.entity.AppletUser;
import lombok.Data;

import java.util.List;

/**
 * 论坛帖子留言对象 applet_forum_comment
 * 
 * @author tang
 * @date 2023-03-29
 */
@Data
public class AppletForumCommentVO extends AppletForumComment
{

    @BindField(entity = AppletUser.class,field = "id",condition = "this.user_id = id")
    private String userId;

    @BindField(entity = AppletUser.class,field = "nickName",condition = "this.user_id = id")
    private String nickName;

    @BindEntityList(entity = AppletForumComment.class,condition = "this.id = pid", deepBind = true)
    private List<AppletForumCommentVO> childForumCommentList;

    @BindField(entity = AppletForum.class,field = "title",condition = "this.forum_id = id")
    private String forumTitle;
}
